<%@ page import="java.util.List" %>
<%@ page import="java.util.Collection" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

<%--<c:if test="${not empty param.movieCards}">--%>
<%--    <c:set scope="page" var="movieCards" value="${param.movieList}"/>--%>
<%--    <c:set scope="page" var="displayTitle" value="${param.displayTitle}"/>--%>


<%--</c:if>--%>

<div class="my-8">
    <div class="mb-4 flex items-center justify-between">
        <h2 class="text-2xl font-bold">${param.displayTitle}</h2>
        <a href="#" class="btn btn-ghost btn-sm">更多 ></a>
    </div>
    <div class="grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6">



    <%-- 采用 jsp 中的 c:foreach 遍历6条数据 --%>
<%--        <span>--%>
<%--            ${movieList}--%>
<%--        </span>--%>

            <%--

            [MovieCard(image=https://img.kuaichezy.net/upload/vod/20241223-1/7f498ac3effc111d4015cd72a0b51c6a.jpg, episode=更新全集, title=爸妈车祸我淡定美容, genre=, movieId=98658, blurb=, isNull=false)]


            --%>
            <%-- 假设有一个名为 movieCards 的列表 --%>

<%--            <sapn>--%>
<%--                <c:out value="${movieCard}"/>--%>
<%--            </sapn>--%>
<%--            --%>
            <div class="card movie-card" style="max-height: none; max-width: none;!important;">
                <figure class="relative pt-[140%]">
                    <img src="${movieList.image}" alt="TV Show" class="absolute inset-0 h-full w-full object-cover"/>
                    <div class="absolute top-0 right-0 m-2 badge badge-secondary">${movieList.episode}</div>
                </figure>
                <div class="p-2 card-body">
                    <h3 class="text-sm card-title">${show.title}</h3>
                    <p class="text-xs text-gray-400">${show.genre}</p>
                </div>
            </div>
    </div>
</div>